<?php
class ClsWClient extends ClsWrapper
{
  	/**
         * company
         * @package naanal
         * @var string 
         */
        protected $company=null;  	
        /**
         * address1
         * @package naanal
         * @var string 
         */
  	protected $address1=null;
        /**
         * address2
         * @package naanal
         * @var string 
         */
  	protected $address2=null;  	
        /**
         * city
         * @package naanal
         * @var string 
         */
  	protected $city=null;
        /**
         * country
         * @package naanal
         * @var string 
         */
  	protected $country=null;
        /**
         * state
         * @package naanal
         * @var string 
         */
  	protected $state=null;  	
        /**
         *logo
         * @package naanal
         * @var string 
         */
  	protected $logo=null;  
        /**
         * email
         * @package naanal
         * @var string 
         */
  	protected $email=null;
        /**
         * defaultuser
         * @package naanal
         * @var string 
         */
  	protected $defaultuser=null;
        /**
         * pdo
         * @package naanal
         * @var string 
         */
  	protected $pdo=null;
	  
	//public $tableName=null;
        /**
         * construct
         * @package naanal
         */
	function __construct($module=false)
	{
		parent::__construct($module);
	}
	/**
         * get_email
         * @package naanal
         * @return string
         */
	function get_email()
	{
		return $this->email;
	}
        /**
         * set_email
         * @package naanal
         * @param string $email
         */
	function set_email($email)
	{
		$this->email=$email;
	}
        /**
         * get_id
         * @package naanal
         * @return string
         */
	function get_id()
	{
		return $this->id;
	}
        /**
         * set_id
         * @package naanal
         * @param integer $id
         */
	function set_id($id)
	{
		$this->id=$id;
	}
	/**
         * isDatabaseExist
         * @package naanal
         * @return boolean 
         */
	function isDatabaseExist()
	{
		$sql="select * from `database` where client_id=".$this->id;//trace($sql);
		$this->pdo->setQuery($sql);
		$obj=$this->pdo->getObject("ClsWDatabase");
		if($obj) return true;
		else return false;
	}
	/**
         * get_defaultuser
         * @package naanal
         * @return string 
         */
	function get_defaultuser()
	{
		return $this->defaultuser;
	}
        /**
         * set_defaultuser
         * @package naanal
         * @param string $defaultuser
         */
	function set_defaultuser($defaultuser)
	{
		$this->defaultuser=$defaultuser;
	}
	/**
         * get_company
         * @package naanal
         * @return string 
         */
  	public function get_company()
  	{
  		return $this->company;
  	}
        /**
         * set_company
         * @package naanal
         * @param string $company
         */
  	public function set_company($company)
  	{
  		$this->company=$company;
  	}
        /**
         * get_address1
         * @package naanal
         * @return string 
         */
   	public function get_address1()
  	{
  		return $this->address1;
  	}
        /**
         * set_address1
         * @package naanal
         * @param string $address1 
         */
  	public function set_address1($address1)
  	{
  		$this->address1=$address1;
  	}
        /**
         * get_address2
         * @package naanal
         * @return string 
         */
  	public function get_address2()
  	{
  		return $this->address2;
  	}
        /**
         * get_address2
         * @package naanal
         * @param string $address2
         */
  	public function set_address2($address2)
  	{
  		$this->address2=$address2;
  	}
        /**
         * get_city
         * @package naanal
         * @return string 
         */
  	public function get_city()
  	{
  		return $this->city;
  	}
        /**
         * set_city
         * @package naanal
         * @param string $city
         */
  	public function set_city($city)
  	{
  		$this->city=$city;
  	}
        /**
         * get_country
         * @package naanal
         * @return string 
         */
  	public function get_country()
  	{
  		return $this->country;
  	}
        /**
         * set_country
         * @package naanal
         * @param string $country
         */
  	public function set_country($country)
  	{
  		$this->country=$country;
  	}
        /**
         * get_state
         * @package naanal
         * @return string 
         */
  	public function get_state()
  	{
  		return $this->state;
  	}
        /**
         * set_state
         * @package naanal
         * @param string $state
         */
  	public function set_state($state)
  	{
  		$this->state=$state;
  	}
        /**
         * get_logo
         * @package naanal
         * @return string 
         */
  	public function get_logo()
  	{
  		return $this->logo;
  	}
        /**
         * set_logo
         * @package naanal
         * @param string $logo 
         */
  	public function set_logo($logo)
  	{
  		$this->logo=$logo;
  	}
        /**
         * getArray
         * @package naanal
         * @return array 
         */
	function getArray()
	{
		$arr=null;
		$arr["id"]=$this->get_id();
  		$arr["company"]=$this->get_company();
  		$arr["address1"]=$this->get_address1();
  		$arr["address2"]=$this->get_address2();
  		$arr["city"]=$this->get_city();
  		$arr["country"]=$this->get_country();
  		$arr["state"]=$this->get_state();
  		$arr["logo"]=$this->get_logo();
  		$arr["email"]=$this->get_email();
  		$arr["defaultuser"]=$this->get_defaultuser();
		return $arr;
	}
        /**
         * setArray
         * @package naanal
         * @param array $arr
         * @return array 
         */
	function setArray($arr)
	{
		if(isset($arr["id"])) $this->set_id($arr["id"]);
  		if(isset($arr["company"])) $this->set_company($arr["company"]);  	
  		if(isset($arr["address1"])) $this->set_address1($arr["address1"]);
  		if(isset($arr["address2"])) $this->set_address2($arr["address2"]);
  		if(isset($arr["city"])) $this->set_city($arr["city"]);
  		if(isset($arr["country"])) $this->set_country($arr["country"]);
  		if(isset($arr["state"])) $this->set_state($arr["state"]);
  		if(isset($arr["logo"])) $this->set_logo($arr["logo"]);
  		if(isset($arr["email"])) $this->set_email($arr["email"]);
  		if(isset($arr["defaultuser"])) $this->set_defaultuser($arr["defaultuser"]);
  	
		return $arr;		
	}  
}	
?>